package com.example.wweather;

import com.example.object.Weather;

import android.app.Activity;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.ImageView;

public class Ropa extends Activity {
	Drawable drawable;

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ropa);

		ImageView iv = (ImageView) findViewById(R.id.imageView1);
		Resources res = getResources();
		Bundle extras = getIntent().getExtras();
		String wc = extras.getString("DescClima");
		int wcc= extras.getInt("CodClima");
		if (wc.equals( "Despejado/Soleado")) {
			drawable = res.getDrawable(R.drawable.soleado);
		} else if (wc.equals("Lluvia ligera")||wcc>=143) {
			drawable = res.getDrawable(R.drawable.lluvioso);
		} else if (wc.equals("Nublado") || wc.equals("Parcialmente Nublado")) {
			drawable = res.getDrawable(R.drawable.nublado);
		} else {
			drawable = res.getDrawable(R.drawable.despejado);
		}
		iv.setImageDrawable(drawable);
	}

}
